//
//  LoginManager.m
//  Toyohu
//
//  Created by GuoPeng on 16/4/24.
//  Copyright © 2016年 celia. All rights reserved.
//

#import "LoginManager.h"
#import "GPCustomMD.h"

@implementation LoginManager

+ (instancetype)shareLoginManager
{
    static LoginManager *shareLoginManager;
    static dispatch_once_t once;
    dispatch_once(&once, ^{
        shareLoginManager = [[LoginManager alloc] init];
    });
    
    return shareLoginManager;
}

- (BOOL)isLoggedin
{
    if (!GPGET(@"loginInfo")) {
        return NO;
    } else {
        return YES;
    }
}

//- (NSString *)pId
//{
//    if (!self.pId) {
////        self.pId = [self getPid];
//    }
//    return self.pId;
//}

- (NSString *)getPid
{
    return [[(NSDictionary *)GPGET(@"loginInfo") objectForKey:@"msg"] objectForKey:@"pId"];
}


@end
